﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dreamz
{
    public class Rum4
    {
        static public void Apply()
        {
           //Adds methods invoked through events, like taking the triangle
            GameEngine.S.World[1, 2].Items["triangle"].OnTake += new EventHandler(TakeTriangle);
        }
        static public void TakeTriangle()
        {
           //Changes the relevant descriptions and adds a funktion invoked when using the traingle.
            GameEngine.S.World[1, 2].Items["chest"].Description = "This chest is empty, and feeling pretty lonely.\n";
            GameEngine.S.Player.Inventory["triangle"].OnUse += new EventHandler(UseTriangle);
        }
        static public void UseTriangle()
        {
            //This method is used for inserting the triangle into a doorway, work together with useBall, UseCube to open the door.
            Rum9.InsertShape("triangle");
            GameEngine.S.Player.Inventory.Remove("triangle");
        }
    }
}
